package com.ruoyi.area.service.impl;

import java.util.List;

import com.ruoyi.area.domain.HouseAreaExportT;
import com.ruoyi.committee.domain.HouseCommitteeT;
import com.ruoyi.door.domain.HouseDoorT;
import com.ruoyi.group.domain.HouseGroupT;
import com.ruoyi.unit.domain.HouseUnitT;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.area.mapper.HouseAreaTMapper;
import com.ruoyi.area.domain.HouseAreaT;
import com.ruoyi.area.service.IHouseAreaTService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 小区管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-17
 */
@Service
public class HouseAreaTServiceImpl implements IHouseAreaTService 
{
    @Autowired
    private HouseAreaTMapper houseAreaTMapper;

    /**
     * 查询小区管理
     * 
     * @param areaId 小区管理主键
     * @return 小区管理
     */
    @Override
    public HouseAreaT selectHouseAreaTByAreaId(Long areaId)
    {
        return houseAreaTMapper.selectHouseAreaTByAreaId(areaId);
    }

    /**
     * 查询小区管理列表
     * 
     * @param houseAreaT 小区管理
     * @return 小区管理
     */
    @Override
    public List<HouseAreaExportT> selectHouseAreaTList(HouseAreaT houseAreaT)
    {
        return houseAreaTMapper.selectHouseAreaTList(houseAreaT);
    }

    @Override
    public List<HouseAreaExportT> selectHouseAreaNPropertyList(HouseAreaT houseAreaT) {
        return houseAreaTMapper.selectHouseAreaNPropertyList(houseAreaT);
    }

    @Override
    public HouseAreaExportT selectHouseAreaSum(HouseAreaT houseAreaT)
    {
        return houseAreaTMapper.selectHouseAreaSum(houseAreaT);
    }

    /**
     * 新增小区管理
     * 
     * @param houseAreaT 小区管理
     * @return 结果
     */
    @Transactional
    @Override
    public int insertHouseAreaT(HouseAreaT houseAreaT)
    {
        return houseAreaTMapper.insertHouseAreaT(houseAreaT);
    }

    /**
     * 修改小区管理
     * 
     * @param houseAreaT 小区管理
     * @return 结果
     */
    @Transactional
    @Override
    public int updateHouseAreaT(HouseAreaT houseAreaT)
    {
        houseAreaTMapper.updateHouseAreaGroupT(houseAreaT);
        houseAreaTMapper.updateHouseAreaUnitT(houseAreaT);
        houseAreaTMapper.updateHouseAreaDoorT(houseAreaT);
        houseAreaTMapper.updateHouseRepairAreaT(houseAreaT);
        return houseAreaTMapper.updateHouseAreaT(houseAreaT);
    }

    /**
     * 批量删除小区管理
     * 
     * @param areaIds 需要删除的小区管理主键
     * @return 结果
     */
    @Transactional
    @Override
    public int deleteHouseAreaTByAreaIds(Long[] areaIds)
    {
        return houseAreaTMapper.deleteHouseAreaTByAreaIds(areaIds);
    }

    /**
     * 删除小区管理信息
     * 
     * @param areaId 小区管理主键
     * @return 结果
     */
    @Transactional
    @Override
    public int deleteHouseAreaTByAreaId(Long areaId)
    {
        return houseAreaTMapper.deleteHouseAreaTByAreaId(areaId);
    }


    /**
     * 查询
     *
     * @return
     */
    @Override
    public List<HouseCommitteeT> getCommitteeList() {  return houseAreaTMapper.getCommitteeList(); }

    @Override
    public HouseAreaT getAreaEstateInfo(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getAreaEstateInfo(houseAreaT);
    }

    @Override
    public HouseAreaT getCostDate(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getCostDate(houseAreaT);
    }

    @Override
    public HouseAreaT getCostNum(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getCostNum(houseAreaT);
    }

    @Override
    public HouseAreaT getCostNum1(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getCostNum1(houseAreaT);
    }

    @Override
    public HouseAreaT getAreaCost(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getAreaCost(houseAreaT);
    }

    @Override
    public HouseAreaT getAreaCost1(HouseAreaT houseAreaT) {
        return houseAreaTMapper.getAreaCost1(houseAreaT);
    }



}
